<!--ISI MULAI-->
<div class="dash">
    <table border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="bordertebal2"><table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td id="namapel"> <?php echo $namapelatihan ?> | <?php echo $kode ?>-<?php echo $angkatan ?> <span class="delapan"><?php echo $jumlah ?></span></td>
                    </tr>
                    <tr>
                        <td class="borderkanan">Start: <?php echo $tgl_sesi ?></td>
                    </tr>
                </table></td>
        </tr>
    </table>
</div>
    <div class="beftabel">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td class="tempatlihat" valign="top">
                    <div id="lihat">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class=" bagkiri"><div class="con">Kapasitas</div><div class="cen">16</div>
                                </td>
                            </tr>
                            <tr>
                                <td class=" bagkiri"><div class="con">Quota</div><div class="cen"><?php echo $kuota ?></div>
                                </td>
                            </tr>
                            <tr>
                                <td class=" bagkiri"><div class="con">Biaya</div><div class="cen">Rp <?php echo number_format($harga, 0, ',', '.') ?></div>
                                </td>
                            </tr>
                            <tr>
                                <td class=" bagkiri"><div class="con">Jadwal</div><div class="cen">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <?php
                                            if (!empty($waktu)) {
                                                for ($i = 0; $i < count($waktu); $i++) {
                                                    echo '<tr>';
                                                    echo '<td>' . $waktu[$i]['hari'] . '</td>';
                                                    echo '</tr>';
                                                    echo '<tr>';
                                                    echo '<td>' . $waktu[$i]['jam'] . '</td>';
                                                    echo '</tr>';
                                                    echo '<tr>';
                                                    echo '<td>&nbsp;</td>';
                                                    echo '</tr>';
                                                }
                                            } else {
                                                echo 'Belum ditentukan';
                                            }
                                            ?>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td align="left" valign="top" class="samsung">
                    <ul class="tabs2">
                        <li><a href="#tab1"></a></li>
                        <li><a href="#tab2"></a></li>
                        <li><a href="#tab3"></a></li>
                    </ul>
                    <div class="tab_container2">
                    </div>
                    <div id="tab1" class="tab_content2">
                        <table border="0" align="left" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="">&nbsp;</td>
                                <td class="keterangan">Keterangan</td>
                                <td class="keterangan">&nbsp;</td>
                                <td class="heading hiho">Disc</td>
                                <td class="heading hiho">Lunas</td>
                                <td class="heading"><a class="menuorange hiho" href="<?php echo base_url()?>pendaftaran/daftar_con/ceklis_pengambilan/<?php echo $kode?>/<?php echo $angkatan?>/5">Confirm</a></td>
                            </tr>
                            <tr>
                                <td class="name din">Name</td>
                                <td class="name din">Priced</td>
                                <td class="name din">Pay</td>
                                <td class="name">&nbsp;</td>
                                <td class="name">&nbsp;</td>
                                <td class="name">&nbsp;</td>
                            </tr>
                            <?php for ($i = 0; $i < count($pendaftar); $i++) { ?>
                                <tr>    
                                    <td class="bf2"><span class="round"><?php echo ($i + 1) ?></span> <a href="<?php echo base_url() . 'pendaftaran/daftar_con/display_biaya/' . $pendaftar[$i]['ID'] . '/' . $pendaftar[$i]['KODE_PELATIHAN'] . '/' . $pendaftar[$i]['ANGKATAN'] ?>"><?php echo $pendaftar[$i]['NAMA'] ?> (<?php echo $pendaftar[$i]['GOL'] ?>) </a></td>
                                    <td class="bf2">Rp<?php echo number_format($pendaftar[$i]['TOTAL_BAYAR'], 0, ',', '.') ?></td>
                                    <td class="bf2">Rp<?php echo number_format($pendaftar[$i]['sudah_bayar'], 0, ',', '.') ?></td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['diskon'] ?>%</td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['lunas'] ?></td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['cek_confirm'] ?></td>
                                </tr>
                            <?php } ?>
                        </table>
                        <div class="clear"></div>
                        <?php if($jumlah_pendaftar>0){?>
                        <div class="rekap"> 
                            <div class="rekap4"></div>
                            <div class="rekap3">
                                <div class="rekap2">Rekapitulasi</div>
                                <div class="income">Masuk: <span class="putih">Rp <?php echo number_format($pemasukan, 0, ',', '.') ?></span></div>
                                <div class="piutang">Piutang: <span class="putih">Rp <?php echo number_format($piutang, 0, ',', '.') ?></span></div>
                                <div class="clear"></div>
                            </div>
                            <div class="total">Total: <span class="putih">Rp <?php echo number_format($total_harus_bayar, 0, ',', '.') ?></span></div>
                        </div>
                        <div class="rekap"> 
                            <div class="rekap4"></div>
                            <div class="rekap3">
                                <?php
                                    $persen_lunas = 100 * ($total_sudah_lunas / $jumlah_pendaftar);
                                    $persen_confirm = 100 * ($total_sudah_confirm / $jumlah_pendaftar);
                                ?>
                                <div class="rekap2">Others</div>
                                <div class="piutang">Lunas: <span class="putih"><?php echo number_format($persen_lunas,2) ?>%</span></div>
                                <div class="piutang">Confirm: <span class="putih"><?php echo number_format($persen_confirm,2) ?>%</span></div>
                                <div class="clear"></div>
                            </div>
                        </div>
                        <?php } ?>
                    </div>

                    <div id="tab2" class="tab_content2">
                        <table border="0" align="left" cellpadding="0" cellspacing="0">
                            <tr>
                                <td id="no_border">&nbsp;</td>
                                <td class="keterangan">Keterangan</td>
                                <td class="heading"><a class="menuorange hiho" href="<?php echo base_url()?>pendaftaran/daftar_con/ceklis_pengambilan/<?php echo $kode?>/<?php echo $angkatan?>/2">Kit</a></td>
                                <td class="heading"><a class="menuorange hiho" href="<?php echo base_url()?>pendaftaran/daftar_con/ceklis_pengambilan/<?php echo $kode?>/<?php echo $angkatan?>/1">Modul</a></td>
                                <td class="heading"><a class="menuorange hiho" href="<?php echo base_url()?>pendaftaran/daftar_con/ceklis_pengambilan/<?php echo $kode?>/<?php echo $angkatan?>/3">Sertifikat</a></td>
                                <td class="heading"><a class="menuorange hiho" href="<?php echo base_url()?>pendaftaran/daftar_con/ceklis_pengambilan/<?php echo $kode?>/<?php echo $angkatan?>/4">CICCard</a></td>
                            </tr>
                            <tr>
                                <td class="name din">Name</td>
                                <td class="name din">Phone</td>
                                <td class="name">&nbsp;</td>
                                <td class="name">&nbsp;</td>
                                <td class="name">&nbsp;</td>
                                <td class="name">&nbsp;</td>
                            </tr>
                            <?php for ($i = 0; $i < count($pendaftar); $i++) { ?>
                                <tr>
                                    <td class="bf2"><span class="round"><?php echo ($i + 1) ?></span> <a href="<?php echo base_url() . 'pendaftaran/daftar_con/display_biaya/' . $pendaftar[$i]['ID'] . '/' . $pendaftar[$i]['KODE_PELATIHAN'] . '/' . $pendaftar[$i]['ANGKATAN'] ?>"><?php echo $pendaftar[$i]['NAMA'] ?> (<?php echo $pendaftar[$i]['GOL'] ?>) </a></td>
                                    <td class="bf2"><?php echo $pendaftar[$i]['NO_TELP'] ?></td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['kit'] ?></td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['modul'] ?></td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['sertifikat'] ?></td>
                                    <td class="bfcenter"><?php echo $pendaftar[$i]['kartu'] ?></td>
                                </tr>    
                            <?php } ?>
                        </table>
                        <?php if($jumlah_pendaftar>0){?>
                        <div class="rekap"> 
                            <div class="rekap4"></div>
                            <div class="rekap3">
                                <?php
                                    $persen_kit = 100*($total_sudah_kit/$jumlah_pendaftar);
                                    $persen_modul = 100*($total_sudah_modul/$jumlah_pendaftar);
                                    $persen_sertifikat = 100*($total_sudah_sertifikat/$jumlah_pendaftar);
                                    $persen_kartu = 100*($total_sudah_kartu/$jumlah_pendaftar);
                                    $overall = ($persen_kit+$persen_modul+$persen_sertifikat+$persen_kartu)/4*100;
                                ?>
                                <div class="rekap2">Distribusi</div>
                                <div class="piutang">Kit: <span class="putih"><?php echo number_format($persen_kit,2)?>%</span></div>
                                <div class="piutang">Modul: <span class="putih"><?php echo number_format($persen_modul,2)?>%</span></div>
                                <div class="piutang">Sertifikat: <span class="putih"><?php echo number_format($persen_sertifikat,2)?>%</span></div>
                                <div class="piutang">Card: <span class="putih"><?php echo number_format($persen_kartu,2)?>%</span></div>
                                <div class="clear"></div>
                            </div>
                            <div class="total">Overall: <span class="putih"><?php echo number_format($overall,2)?>%</span></div>
                        </div>
                        <?php } ?>
                        <!---->
                        <!---->
                    </div>
                    <div id="tab3" class="tab_content2">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="">&nbsp;</td>
                                <td class="keterangan">Keterangan</td>
                                <td class="keterangan">&nbsp;</td>
                                <td class="heading"><a class="menuorange hiho" href="<?php echo base_url() . 'pendaftaran/daftar_con/list_attendance/'.$kode.'/'.$angkatan?>">Attendance</a></td>
                                <td class="heading hiho">Absen</td>
                            </tr>
                            <tr>
                                <td class="name din">Name</td>
                                <td class="name din" colspan="2">Students ID</td>

                                <td class="name">&nbsp;</td>
                                <td class="name">&nbsp;</td>
                            </tr>
                            <?php for($i=0;$i<count($pendaftar);$i++){?>
                            <tr>
                                <td class="bf2"><span class="round"><?php echo ($i + 1) ?></span> <a href="<?php echo base_url() . 'pendaftaran/daftar_con/display_biaya/' . $pendaftar[$i]['ID'] . '/' . $pendaftar[$i]['KODE_PELATIHAN'] . '/' . $pendaftar[$i]['ANGKATAN'] ?>"><?php echo $pendaftar[$i]['NAMA'] ?> (<?php echo $pendaftar[$i]['GOL'] ?>) </a></td>
                                <td class="bfcenter"><?php echo $pendaftar[$i]['no_kartu'] ?></td>
                                <td class="bfcenter2"><?php echo $pendaftar[$i]['no_sert'] ?></td>
                                <td class="bfcenter"><?php echo number_format($pendaftar[$i]['attendance'],2) ?>%</td>
                                <td class="bfcenter"><?php echo $pendaftar[$i]['absen'] ?></td>
                            </tr>
                            <?php } ?>
                        </table>
                        <?php if(count($pendaftar)>0){?>
                        <div class="rekap"> 
                            <div class="rekap4"></div>
                            <?php
                                $persenfull = $full_attendance/$jumlah_pendaftar;
                                $persenmin = $min_attendance/$jumlah_pendaftar;
                                $rata_attn = ($persenfull+$persenmin)/2;
                            ?>
                            <div class="rekap3">
                                <div class="rekap2">Presence</div>
                                <div class="piutang">Full Attendance: <span class="putih"><?php echo number_format($persenfull,2)?>%</span></div>
                                <div class="piutang">Min Attendance: <span class="putih"><?php echo number_format($persenmin,2)?>%</span></div>
                                <div class="clear"></div>
                            </div>
                            <div class="total">Average: <span class="putih"><?php echo number_format($rata_attn,2)?>%</span></div>
                        </div>
                        <?php }?>
                        <!---->
                    </div>
                    </div>
                    <div class="clear"></div>
                    <?php if($jumlah_pendaftar>0){?>
                    <div class="plot2">
                        <a href="<?php echo base_url()?>pendaftaran/daftar_con/list_nohp/<?php echo $kode?>/<?php echo $angkatan?>" target="_blank" class="sun">Phone Number List</a> 
                        <a href="<?php echo base_url()?>pendaftaran/daftar_con/rekap_bayar_perkelas/<?php echo $kode?>/<?php echo $angkatan?>" target="_blank" class="sun">Rekapitulasi Pembayaran</a>
                        <a href="<?php echo base_url()?>pendaftaran/daftar_con/cetak_dokumen/<?php echo $kode?>/<?php echo $angkatan?>" target="_blank" class="sun">Cetak Dokumen</a>
                    </div>
                    <?php } ?>
                    <!------>
                    <div class="clear"></div>

                    <!------>

                </td>
            </tr>
        </table>
    </div>

</div>
</td>
<td class="b6"></td>
</tr>
<tr>
    <td class="b4"></td>
    <td class="b5">    <div class="footer2">Copyright &copy;2011 CIC Team | Credits</div></td>
    <td class="b6"></td>
</tr>
<tr>
    <td id="b7"></td>
    <td id="b8"></td>
    <td id="b9"></td>
</tr>
</table>
